package com.example.brazil_project.listener;



import com.example.brazil_project.function.IndexFunction;
import com.example.brazil_project.parameter.Parameter;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.util.Log;
import android.webkit.WebView;


public class MyGestureListener extends GestureListener {
	public Activity context ;
	public WebView webview ;
	public IndexFunction indexfunction =null;
	 public MyGestureListener(Activity context,WebView webview) {  
         super(context);  
         this.context = context;
         this.webview = webview;
         indexfunction= new IndexFunction(context,webview);
     }  

     @Override  
     public String left() {  
         Log.e("test", "left");  
         control(super.left());
         return super.left();  
     }  

     @Override  
     public String right() {  

         control(super.right());
         return super.right();  
     }  
     
     private void control(String orientation) {
    	 if(context.getLocalClassName().equals("IndexActivity"))
         {
        	 indexfunction.showInfo(orientation);
         }

	}
 }  

